#!/bin/sh
ABORTTEST="if [ -f abort.now ];then return;fi"
if [ -z $J264_PRESET ];then
    PRESET="\"Android\""
else
    PRESET="\"$J264_PRESET\""
fi
for input in $(find $STARTDIR -iname '*.m2v');do
    plainoutput=$(basename $input .m2v)
    output="$(dirname $input)/$plainoutput.m4v"
    echo "HandBrakeCLI -Z $PRESET -i $input -o $output"
    echo $ABORTTEST
done
